package liuch.learnjdbc.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import liuch.learnjdbc.service.IStroageService;

/**
 * @author: liuchenhui
 * @create: 2019-08-01 13:09
 **/
@Service
public class StroageServiceImpl implements IStroageService {
    @Autowired
    JdbcTemplate jdbcTemplate;

    @Override
//    @Transactional
    public void abatementStroage() {
        jdbcTemplate.execute("update fescar_demo.storage_tbl set count = count-1 where commodity_code = '123'");
    }
}
